
import React, { useState } from 'react';

import { BrowserRouter as Router, Route,  Link,Routes } from 'react-router-dom';
import App from "../App"
import VtkApp from "../pages/myvtkjs.jsx"

const Home = () => <div>首页</div>;

const About = () => <div>关于我们</div>;

const Contact = () => <div>联系我们</div>;



function Root() {

  const [currentPage, setCurrentPage] = useState('Home');



  return (

    <Router>

      <div>

        <nav>

          <ul>

            <li>

              <Link to="/">首页</Link>

            </li>

            <li>

              <Link to="/about">关于我们</Link>

            </li>

            <li>

              <Link to="/contact">联系我们</Link>

            </li>

          </ul>

        </nav>



        <Routes>

          <Route path="/"   Component={App} />
          <Route path="/VtkApp"   Component={VtkApp} />
          

        </Routes>

      </div>

    </Router>

  );

}



export default Root;

